//
//  GameClear.m
//  CountDown2
//
//  Created by mmac on 11/23/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "GameClearView.h"
#import "PlayViewController.h"


@implementation GameClearView


@synthesize viewController;

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
	[viewController loadMainMenu];
}

- (id)initWithFrame:(CGRect)frame viewController:(PlayViewController *)aController {
    self = [super initWithFrame:frame];
    if (self != nil) {
        self.viewController = aController;
		
        [self setupSubviewsWithContentFrame:frame];
    }
    return self;
}

-(void)setupSubviewsWithContentFrame:(CGRect)frameRect{
	NSLog(@"GameOver View contentFrame at (%u,%u) %ux%u", frameRect.origin.x, frameRect.origin.y, frameRect.size.width, frameRect.size.height);
	
	[self setOpaque:YES];
	
}


- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        // Initialization code
    }
    return self;
}




- (void)drawRect:(CGRect)rect {
    // Drawing code
	
	UIImage *bgImage = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"gameclear" ofType:@"png"]];
	[bgImage drawInRect:rect];
	[bgImage release];
}


- (void)dealloc {
    [super dealloc];
}

@end
